<?php
	$sql = new db();
	$req = "SELECT region AS region FROM  entrepot UNION SELECT ville AS region FROM fmp";
	$sql->query($req);
	$region = array();
	while ($res = $sql->fetch_array())
		$region[] = $res;
	$array[] = $res;
	
	if (isset($_GET['action']) && $_GET['action'] == "valider")
		{
			$sql = new db();
			$req = "INSERT INTO offre_transport VALUES (".$_SESSION['login'].", ".$_GET['idcom'].", 'P', ".$_POST['prix'].")";
			$sql->query($req);
			$req = "UPDATE commande SET Last_Mod = ".time()." WHERE Id_Commande=".$_GET['idcom'];
			$sql->query($req);
			if (isset($_GET['replace']) && $_GET['replace'] == 'yes')
				header("location:".ABS_PATH.ROOT."?page=Transporteur/OffresPasse&fct=Transporteur/OffresPasse");		

		}
?>